﻿#ifndef IPINPUTCONTROL_H
#define IPINPUTCONTROL_H

#include <QWidget>
#include <QKeyEvent>
#include <QRegularExpression>
#include <QRegularExpressionValidator>
QT_BEGIN_NAMESPACE
namespace Ui { class ipInputControl; }
QT_END_NAMESPACE

class ipInputControl : public QWidget
{
    Q_OBJECT

public:
    ipInputControl(QWidget *parent = nullptr);
    ~ipInputControl();
signals:
    void warningIP(const QString&);
public slots:
    QString getIP() const;
    void setIP(const QString&);
private:
    void keyPressEvent(QKeyEvent*);
    bool eventFilter(QObject*, QEvent*);
    void checkInput(const QString&);
private:
    Ui::ipInputControl *ui;
};
#endif // IPINPUTCONTROL_H
